package com.bigbigrain.jiagou.controller;

import com.bigbigrain.jiagou.annotation.ExtApiIdempotent;
import com.bigbigrain.jiagou.annotation.ExtApiToken;
import com.bigbigrain.jiagou.utils.ConstantUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @description: 重复提交
 * @author: B1gB1gRA1n
 * @create: 2020-4-22 15:45
 **/
@RequestMapping("/repeat")
@RestController
public class RepeatController {

    @ExtApiToken
    @RequestMapping("/toIndex")
    public Map<String, Object> toIndex(){
        Map<String, Object> result = new HashMap<>();
        result.put("data",100);
        return result;
    }

    @ExtApiIdempotent(type= ConstantUtils.EXTAPIHEAD)
    @RequestMapping("/pay")
    public  Map<String, Object> pay(){
        Map<String, Object> result = new HashMap<>();
        result.put("data",true);
        return result;
    }

}
